home *** CD-ROM | disk | FTP | other *** search
- package Local.Game.Thing
- {
- import Local.Game.World.CAngle;
- import Local.Game.World.CPosition;
-
- public class CShotClusterBombFragment extends CShot
- {
-
-
- private var mDeltaRadians:Number;
-
- private var mFlare:CThingAnimation;
-
- public function CShotClusterBombFragment(param1:CPosition, param2:CPosition)
- {
- if(true)
- {
- super(param1);
- if(true)
- {
- mType = "clusterbombfragment";
- if(true)
- {
- Process = Process_Normal;
- if(true)
- {
- mAngle = CAngle.AsAngle256(64);
- if(true)
- {
- mDelta = new CPosition();
- if(true)
- {
- mMaxLife = mLife = 1;
- }
- mOrientation = 1;
- }
- §§push(§§findproperty(mDelta));
- §§push(CPosition);
- §§push(param2);
- §§push(§§findproperty(CPosition));
- §§push(Math.random() * 30 - 15);
- §§push(-Math.random());
- if(true)
- {
- §§push(§§pop() * 30 - 15);
- }
- §§pop().mDelta = §§pop().ADD(§§pop(),new §§pop().CPosition(§§pop(),§§pop()));
- }
- §§push(§§findproperty(mDeltaRadians));
- §§push(Math.random() * 3);
- if(true)
- {
- §§push(§§pop() - 1.5);
- }
- §§pop().mDeltaRadians = §§pop();
- }
- mShowOnMap = true;
- }
- AddAnimation("stand",ClusterBomb_Fragment,"AddSprite_Black");
- }
- }
-
- override public function Draw() : void
- {
- if(true)
- {
- super.Draw();
- DrawSprite(GetOrientationMatrix());
- }
- }
-
- public function Process_Normal() : void
- {
- var _loc1_:Number = NaN;
- mDelta.x *= 0.99;
- mDelta.y = mDelta.y * 0.99 + 1;
- mDeltaRadians *= 0.95;
- Move(mDelta);
- mAngle.mAngleRAD += mDeltaRadians;
- _loc1_ = mLandscape.GetAltitude(mPosition.x);
- if(mPosition.y >= _loc1_)
- {
- AddThing(new CEffectExplosionSmall(new CPosition(mPosition.x,_loc1_)));
- DispatchDispose();
- }
- }
- }
- }
-